package com.lwj.designpattern.strategy;

/**
 * @author wujilee
 * @date 2023/2/13
 */
public class DogCompartor implements Compartor<Dog>{

    @Override
    public int compareTo(Dog o1, Dog o2) {
        if(o1.getFood()<o2.getFood()){
            return  -1;
        }
        if(o1.getFood()>o2.getFood()){
            return  1;
        }
        return 0;
    }
}
